/PROG  PNS0001
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "GN P0282075/2077";
PROG_SIZE	= 3153;
CREATE		= DATE 22-05-23  TIME 08:31:40;
MODIFIED	= DATE 24-11-27  TIME 19:37:24;
FILE_NAME	= PNS0073;
VERSION		= 0;
LINE_COUNT	= 119;
MEMORY_SIZE	= 3605;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0051 ;
   7:  !  PART:P0282075/2077 ;
   8:  !ZYL2022.5.23******************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  DO[38]=OFF ;
  13:  R[14]=90    ;
  14:  R[18]=1    ;
  15:  R[19]=.1    ;
  16:  R[35]=TIMER[4]    ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[1] ;
  24:  CALL ARM_CHECK    ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  28:  PR[6]=PR[15]    ;
  29:  R[1]=0    ;
  30:  TIMER[1]=RESET ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  !PROCEED TO PICK ;
  36:  LBL[20] ;
  37:  IF DI[1]=ON AND DI[2]=ON,JMP LBL[40] ;
  38:  IF DI[29]=ON,JMP LBL[90] ;
  39:  JMP LBL[20] ;
  40:   ;
  41:  LBL[40:MEASURE HEIGHT??] ;
  42:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON AND DI[46]=ON,JMP LBL[70] ;
  43:   ;
  44:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON,JMP LBL[30] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[40] ;
  47:   ;
  48:  LBL[70:MEASURE HEIGHT!!] ;
  49:  OVERRIDE=R[5] ;
  50:   ;
  51:  PR[5]=PR[15]    ;
  52:  PR[5,3]=PR[15,3]-500    ;
  53:J P[3:SAFE POUNCE] 100% CNT100    ;
  54:  SKIP CONDITION DI[9]=ON AND DI[11]=ON    ;
  55:  CALL PARTPICK    ;
  56:L PR[15] 100mm/sec CNT30    ;
  57:L PR[5] 30mm/sec CNT30 Skip,LBL[80],PR[6]=LPOS    ;
  58:  LBL[80] ;
  59:  DO[37]=PULSE,1.0sec ;
  60:  CALL PARTDROP    ;
  61:  DO[41]=PULSE,2.0sec ;
  62:   ;
  63:J P[3:SAFE POUNCE] 30% CNT100    ;
  64:  PAUSE ;
  65:  JMP LBL[30] ;
  66:   ;
  67:  LBL[30:GOTO DROP POUNCE] ;
  68:  OVERRIDE=R[5] ;
  69:J P[3:SAFE POUNCE] 30% CNT100    ;
  70:  DO[38]=ON ;
  71:  R[45]=PR[6,3]    ;
  72:  IF R[45]<=(-1900) OR DI[29]=ON,JMP LBL[90] ;
  73:   ;
  74:  IF DI[2]=ON AND DI[4]=ON AND DI[44]=ON,JMP LBL[50] ;
  75:  JMP LBL[30] ;
  76:  LBL[50:MOVE DROP SNEAK] ;
  77:  OVERRIDE=R[5] ;
  78:  IF R[45]<=(-1500),JMP LBL[98] ;
  79:  JMP LBL[99] ;
  80:  LBL[98] ;
  81:  DO[40]=PULSE,1.0sec ;
  82:  LBL[99] ;
  83:   ;
  84:   ;
  85:L PR[6] 500mm/sec CNT0 DB  150.0mm,DO[37]=PULSE,1.7sec ACC100    ;
  86:   ;
  87:L PR[6] 500mm/sec CNT0 TB   1.00sec,CALL PARTPICK ACC100    ;
  88:  CALL CHK_PICK    ;
  89:  WAIT    .70(sec) ;
  90:L P[5] 1000mm/sec CNT30    ;
  91:  WAIT DI[4]=ON AND DI[5]=ON AND DI[38]=ON AND DI[45]=OFF    ;
  92:  PR[6,3]=PR[6,3]-2.5    ;
  93:  DO[38]=OFF ;
  94:J P[10] 30% CNT30    ;
  95:  CALL CHK_PICK    ;
  96:J P[11:DROP] 30% CNT3 TB R[19]sec,CALL PARTDROP    ;
  97:  DO[6]=PULSE,1.0sec ;
  98:J P[12] 50% CNT100    ;
  99:  CALL CHK_DROP    ;
 100:J P[9] 50% CNT100    ;
 101:  DO[38]=ON ;
 102:  IF DI[29]=ON,JMP LBL[90] ;
 103:  IF DI[44]=ON,JMP LBL[30] ;
 104:  JMP LBL[86] ;
 105:  LBL[86] ;
 106:  DO[22]=PULSE,3.0sec ;
 107:  JMP LBL[89] ;
 108:  LBL[89] ;
 109:  IF DI[29]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:  LBL[90:END OF CYCLE] ;
 112:  TIMER[1]=STOP ;
 113:J P[3:SAFE POUNCE] 100% CNT100    ;
 114:J P[8:DROP POUNCE] 5% CNT100    ;
 115:J P[2:PICK POUNCE] 10% CNT100    ;
 116:  MOVE TO HOME    ;
 117:  DO[38]=OFF ;
 118:  R[38]=0    ;
 119:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2659.957  mm,	Y =  -743.334  mm,	Z =  -927.922  mm,
	W =  -179.311 deg,	P =      .574 deg,	R =   -89.997 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2657.790  mm,	Y =  -744.000  mm,	Z =  -936.231  mm,
	W =  -179.311 deg,	P =      .573 deg,	R =   -90.000 deg
};
P[3:"SAFE POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2534.896  mm,	Y = -2197.240  mm,	Z =  -666.806  mm,
	W =  -179.410 deg,	P =      .569 deg,	R =   -90.013 deg
};
P[5]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2534.896  mm,	Y = -2197.240  mm,	Z =  -666.806  mm,
	W =  -179.410 deg,	P =      .569 deg,	R =   -90.013 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2487.000  mm,	Y = -1405.211  mm,	Z =  -830.000  mm,
	W =  -179.305 deg,	P =      .575 deg,	R =   -89.997 deg
};
P[9]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2534.897  mm,	Y = -2197.240  mm,	Z =  -666.806  mm,
	W =  -179.410 deg,	P =      .569 deg,	R =   -90.013 deg
};
P[10]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2534.898  mm,	Y = -2944.115  mm,	Z =  -649.045  mm,
	W =  -179.410 deg,	P =      .569 deg,	R =   -89.166 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2534.897  mm,	Y = -2944.115  mm,	Z =  -722.486  mm,
	W =  -179.410 deg,	P =      .569 deg,	R =   -89.166 deg
};
P[12]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2534.898  mm,	Y = -2944.115  mm,	Z =  -649.045  mm,
	W =  -179.410 deg,	P =      .569 deg,	R =   -89.166 deg
};
/END
